Skip to content

Changed "type" to "enum" object that accepts more info.#230

Merged
james-ball-qualcomm merged 10 commits intomainfrom
add_behavior_to_warl_enum
Mar 25, 2026
Merged

Changed "type" to "enum" object that accepts more info.#230
james-ball-qualcomm merged 10 commits intomainfrom
add_behavior_to_warl_enum

Conversation

@james-ball-qualcomm
Copy link
Copy Markdown
Collaborator

No description provided.

Signed-off-by: James Ball <jameball@qti.qualcomm.com>
Copilot AI review requested due to automatic review settings March 24, 2026 19:51
@james-ball-qualcomm james-ball-qualcomm self-assigned this Mar 24, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the CSR definition model to replace the previous type: [...] selector with an enum object that can carry both legal values and illegal-write behavior, and propagates that change through the generator, schemas, docs, and fixtures.

Changes:

  • Add enum support to type-string rendering and CSR HTML rendering.
  • Update CSR YAML ingestion + params JSON output to emit enum: { legal, illegal-write-* } (and preserve original literal texts for HTML).
  • Update JSON schemas and test fixtures to reflect the new CSR encoding.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
tools/shared_utils.py Teach infer_param_type_string() to render enum.legal (integer list) as a bracketed enum display.
tools/create_params.py Parse CSR enum object (legal + illegal-write behavior), preserve authored literal text for HTML, emit enum in CSR output.
tools/README.md Document CSR selector change from type to enum and describe expected fields.
tests/shared_utils/test_shared_utils.py Add success case + update fatal-message expectation for infer_param_type_string() with enum.
tests/params/test-ch2.yaml Migrate CSR definitions from type to enum and add new enum test cases.
tests/params/expected/test-params.json Update expected params JSON CSR entries to use enum output.
tests/params/expected/test-params.html Update expected params HTML CSR rendering to show enum details and preserved literal text.
tests/norm-rule/test-ch2.yaml Update normative rule names/tags to align with new CSR enum cases.
tests/norm-rule/test-ch2.adoc Update normative tag anchors/text for the updated CSR enum rules.
tests/norm-rule/expected/test-norm-rules.json Update expected normative rules JSON for renamed/added enum-related rules.
tests/norm-rule/expected/test-norm-rules.html Update expected normative rules HTML tables/content for renamed/added enum-related rules.
tests/norm-rule/expected/test-ch2-norm-tags.json Update expected tag map and section tag listings for renamed/added rules.
schemas/params-schema.json Replace CSR output field type with enum and enforce mutual exclusivity with width/ro-mask.
schemas/param-defs-schema.json Replace CSR input field type with enum in the parameter-definition YAML schema.
schemas/param-common-schema.json Introduce csrEnum (input) and csrEnumOutput (output) shapes and rehome CSR enum validation there.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: James Ball <jameball@qti.qualcomm.com>
Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 24, 2026

@james-ball-qualcomm I've opened a new pull request, #231, to work on those changes. Once the pull request is ready, I'll request review from you.

james-ball-qualcomm and others added 4 commits March 24, 2026 13:03
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: James Ball <jameball@qti.qualcomm.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: James Ball <jameball@qti.qualcomm.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: James Ball <jameball@qti.qualcomm.com>
Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 24, 2026

@james-ball-qualcomm I've opened a new pull request, #232, to work on those changes. Once the pull request is ready, I'll request review from you.

james-ball-qualcomm and others added 4 commits March 24, 2026 13:05
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: James Ball <jameball@qti.qualcomm.com>
…utput schemas

Co-authored-by: james-ball-qualcomm <140646808+james-ball-qualcomm@users.noreply.github.com>
Agent-Logs-Url: https://github.com/riscv/docs-resources/sessions/696caf25-8347-46a3-a3c1-eb835d1cfd5c
[WIP] [WIP] Address feedback on "type" to "enum" object changes in PR #230
…h one of these pre-fab schemes.

Signed-off-by: James Ball <jameball@qti.qualcomm.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 15 out of 15 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@james-ball-qualcomm james-ball-qualcomm merged commit a9baab8 into main Mar 25, 2026
6 checks passed
@james-ball-qualcomm james-ball-qualcomm deleted the add_behavior_to_warl_enum branch March 25, 2026 00:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants